<template>
    <img :src="msg" :title="tit"/>
</template>
//刘洋
<script setup>
import {ref} from "vue";
let msg= ref(new URL("../assets/img1.png",import.meta.url).href);
let tit="鼠标点击第一张图片";
setTimeout(()=>{
    msg.value =new URL("../assets/img2.png",import.meta.url).href;
    tit="鼠标点击第二张图片";
},5000);
</script>

<style>
</style>